package main

import ."fmt"

type person struct {
	name string
	age int
}

type student struct {
	person
	grade string
	class string
}

func main() {
	test5()
}

func test5()  {
	Println("this is test5")
	var p person
	p.age = 10 ;
	p.name = "joe"
	Println(p)
	Println(p.name)
	Println(p.age)

	p2:=person{name:"ayana",age:10}
	Println(p2)
	p3:=person{"ayana2",222}
	Println(p3)

	Println("内嵌类型:")
	p4:=student{person{name:"ayana",age:1011},"三年","二班"}
	Println(p4)
	p4.person=person{"lizi",115}
	Println(p4.person.age)
}